<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>popot-2.01: popot::benchmark::Benchmark Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">popot-2.01
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacepopot.html">popot</a>      </li>
      <li class="navelem"><a class="el" href="namespacepopot_1_1benchmark.html">benchmark</a>      </li>
      <li class="navelem"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html">Benchmark</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">popot::benchmark::Benchmark Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="popot::benchmark::Benchmark" -->
<p><code>#include &lt;<a class="el" href="benchmark_8h_source.html">benchmark.h</a>&gt;</code></p>

<p><a href="classpopot_1_1benchmark_1_1Benchmark-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#aeb47c1aa50d6cf0b81b9af5d6c299a46">Benchmark</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a99ac51b8dc0c67a3fcef6606a817e671">~Benchmark</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a65c4f52dcffdac93c76dba3f549d87e9">getMeanError</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a4c5d2b64f54986e3a94fee531ecfa3de">getStdError</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#ab8a6a9f4ef73441c4d82e1f67eacb4e7">getMeanFEvaluations</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a52a907f74d407457913f686bc6975a34">getLogProgress</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#aa37a919f2dff8a32e53a9226da99f3ed">getSuccessRate</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#ad8508d007eda2a781696496f9971e971">getBestPosition</a> (double *pos) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a21a09c7d3d390aac026188bc31126c0f">getBestFitness</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#ad43e98f5c69c7ad0a4b7b052ab42924e">run</a> (int mode=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a97982d69125e42fedb9dc1bed592b1d7">print</a> (std::ostream &amp;os) const </td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html#a062730a0c23b3db549693670b99e7806">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html">Benchmark</a> &amp;b)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Benchmarking class; Given an algorithm and a number of trials for this algorithm it computes the mean error, std, etc... and various statistics on the performances We suppose ALGO provides :</p>
<ul>
<li>a constructor without arguments,</li>
<li>a step method,</li>
<li>a getBestFitness method,</li>
<li>a getBestPosition method</li>
<li>a getEpoch() The Problem is also the one used as template for ALGO; It provides the stop method and the function evaluations counter</li>
</ul>
<p>Tips : To automatically estimate the number of trials for getting a good approximate of the mean error of the algorithm, we may use the (Maurer &amp; Pontil,2009) inequality with the sample mean and sample variance </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aeb47c1aa50d6cf0b81b9af5d6c299a46"></a><!-- doxytag: member="popot::benchmark::Benchmark::Benchmark" ref="aeb47c1aa50d6cf0b81b9af5d6c299a46" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">popot::benchmark::Benchmark::Benchmark </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a99ac51b8dc0c67a3fcef6606a817e671"></a><!-- doxytag: member="popot::benchmark::Benchmark::~Benchmark" ref="a99ac51b8dc0c67a3fcef6606a817e671" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">popot::benchmark::Benchmark::~Benchmark </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a21a09c7d3d390aac026188bc31126c0f"></a><!-- doxytag: member="popot::benchmark::Benchmark::getBestFitness" ref="a21a09c7d3d390aac026188bc31126c0f" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getBestFitness </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the best fitness over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="ad8508d007eda2a781696496f9971e971"></a><!-- doxytag: member="popot::benchmark::Benchmark::getBestPosition" ref="ad8508d007eda2a781696496f9971e971" args="(double *pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void popot::benchmark::Benchmark::getBestPosition </td>
          <td>(</td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the best position over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="a52a907f74d407457913f686bc6975a34"></a><!-- doxytag: member="popot::benchmark::Benchmark::getLogProgress" ref="a52a907f74d407457913f686bc6975a34" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getLogProgress </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the log progress over NB_TRIALS NOT FUNCTIONAL YET </p>

</div>
</div>
<a class="anchor" id="a65c4f52dcffdac93c76dba3f549d87e9"></a><!-- doxytag: member="popot::benchmark::Benchmark::getMeanError" ref="a65c4f52dcffdac93c76dba3f549d87e9" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getMeanError </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the mean error over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="ab8a6a9f4ef73441c4d82e1f67eacb4e7"></a><!-- doxytag: member="popot::benchmark::Benchmark::getMeanFEvaluations" ref="ab8a6a9f4ef73441c4d82e1f67eacb4e7" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getMeanFEvaluations </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the mean number of function evaluations to meet the stop criteria over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="a4c5d2b64f54986e3a94fee531ecfa3de"></a><!-- doxytag: member="popot::benchmark::Benchmark::getStdError" ref="a4c5d2b64f54986e3a94fee531ecfa3de" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getStdError </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the std error over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="aa37a919f2dff8a32e53a9226da99f3ed"></a><!-- doxytag: member="popot::benchmark::Benchmark::getSuccessRate" ref="aa37a919f2dff8a32e53a9226da99f3ed" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double popot::benchmark::Benchmark::getSuccessRate </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the success rate over NB_TRIALS </p>

</div>
</div>
<a class="anchor" id="a97982d69125e42fedb9dc1bed592b1d7"></a><!-- doxytag: member="popot::benchmark::Benchmark::print" ref="a97982d69125e42fedb9dc1bed592b1d7" args="(std::ostream &amp;os) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void popot::benchmark::Benchmark::print </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>os</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Print the statistics </p>

</div>
</div>
<a class="anchor" id="ad43e98f5c69c7ad0a4b7b052ab42924e"></a><!-- doxytag: member="popot::benchmark::Benchmark::run" ref="ad43e98f5c69c7ad0a4b7b052ab42924e" args="(int mode=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void popot::benchmark::Benchmark::run </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em> = <code>0</code></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Runs the benchmarks and computes the statistics </p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a062730a0c23b3db549693670b99e7806"></a><!-- doxytag: member="popot::benchmark::Benchmark::operator&lt;&lt;" ref="a062730a0c23b3db549693670b99e7806" args="(std::ostream &amp;os, const Benchmark &amp;b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>os</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classpopot_1_1benchmark_1_1Benchmark.html">Benchmark</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/opt/GoogleCode/popot/trunk/popot-2.01/src/<a class="el" href="benchmark_8h_source.html">benchmark.h</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>
